yelbatinfandomcom-20200214-history
Sandbox
PDs | |} Templates A should appear when the hovers over a defined . Some "definitions" may be unique to the page. I call these . The words are not underlined. There is no option to provide the meaning directly. The second parameter is only for . If the mouse cursor points at the text, the tooltip displayed is what was extracted from subpage Subtext. This feature uses Template:Subtext (action=edit}} edit). No. I have a better idea! Why not use the Talk page? It could work! The added benefit is that gets people looking there. So, instead of Subtext, let's call it Template:Discussion. It won't directly open the Talk page for editing, nor will it display the "subject" as a hyperlink. Instead, it will display a "talk icon" that hyperlinks to the talk page, where there are instructions on adding comments. Examples: , and are countries about which comments might be provided. Tooltip Still better! A template called Template:Tooltip can combine all the best features. Or, we simply modify Template:Define to work like this instead. In easy usage, the first parameter is the word to appear with a dashed underline, and the second parameter is the tooltip that appears when the mouse cursor hovers. There is no need of any third parameter for alternate spellings. However, in the advanced usage there are specified subject and source parameters. Source is the name of a wiki page from which the tooltip is to be extracted. Subject is the keyword on which the extraction is made. In this advanced usage, the first unnamed parameter is still the word to appear, though without a dashed underline. If there is no unnamed parameter but there is a subject, the subject is displayed instead. So an unnamed parameter is entirely optional. If supplied, it, instead of the subject, becomes the displayed text. (✍ might be a nice choice for this unnamed parameter.) A second unnamed parameter in the advance usage can supply default text (well, additional text, actually) so that something is displayed as a tooltip even though the subject was not located in the source page. The default second parameter text is "Click to edit." This is because, in the advanced usage, the displayed text is a hyperlink to editing the source page! (And this is why no dashed underline is applied when source is specified.) If the subject is located on the source page, "Click to edit." (or, whatever was supplied as the second parameter) still appears, appended to the end of the tooltip. Okay then, what if there is a specified source but no specified subject and no unnamed parameter? In that case, ✍ appears on the page as a hyperlink to editing the source page. There is no tooltip! Lastly, what if there are no parameters at all? No source, no subject, no unnamed parameter. Again, ✍ appears, this time as a hyperlink to editing the current page. But wait. What if there is only a single unnamed parameter? This is like the simple usage, only the user has not specified the text to appear as a tooltip. In this case, the template can work just like Template:Define, using Template:Meaning as the source from which to extract the tooltip. And this is one reason it might be better to re-write Template:Define instead of creating a new Template:Tooltip!!! I've checked all instances of Template:Define and none will have big problems if it's re-written as above. Define * Template:Define takes as a first parameter the word or phrase to be explained when the mouse points at it, and as a second parameter the text that should appear. * If the second parameter is missing or null, the explanation is taken from Template:Meaning, which is a list of definitions. ** If the word or phrase is not contained in that list, "undefined" appears. ** A third parameter may specify different text to be "hovered over" when the second parameter is null, as in If you want the concept's name, or a proper noun, or an abbreviation to appear in text, with additional information hidden until the mouse cursor points at it, use Template:Define. But if you want the explanation/meaning itself to appear in text, use Template:Meaning. For example, Template:Define capitalizes the first letter in the explanation and adds a period to the end. Template:Meaning does not.